


set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(nlohmann_json)

add_library(scene_retrieve scene_retrieve.cpp)


link_libraries("${PROJECT_SOURCE_DIR}/../loop_closing/DBow3/build/libloopclosingmanager.so")
target_link_libraries(scene_retrieve
			${REQUIRED_LIBRARIES}
			#../../loop_closing/DBow3/build/
			#libloopclosingmanager.so
			)

#add_executable(demo demo.cpp)

#target_link_libraries(demo
#			${REQUIRED_LIBRARIES}
#)

add_definitions(${PCL_DEFINITIONS})

add_executable(MakeSceneFromOpenSfMModel 
                        MakeSceneFromOpenSfMModel.cpp)

target_link_libraries(MakeSceneFromOpenSfMModel
                      ${REQUIRED_LIBRARIES}
                      scene_retrieve
                      )

target_link_libraries(MakeSceneFromOpenSfMModel PRIVATE nlohmann_json::nlohmann_json)

add_executable(demo_stereo
               demo_stereo_main.cpp)
target_link_libraries(demo_stereo
			${REQUIRED_LIBRARIES}
			scene_retrieve)
add_executable(demo_mono
               demo_mono_main.cpp ../include/cv_helper.h)
target_link_libraries(demo_mono
			${REQUIRED_LIBRARIES}
			scene_retrieve)


add_library(multi_scene_retriever multi_scene_retriever.cpp)
target_link_libraries(multi_scene_retriever PRIVATE nlohmann_json::nlohmann_json
                       ${REQUIRED_LIBRARIES}
                       scene_retrieve
			)


add_library(scene_retrieving_ros scene_retrieving_ros.cpp)
target_link_libraries(scene_retrieving_ros PRIVATE nlohmann_json::nlohmann_json
                       ${REQUIRED_LIBRARIES}
                       scene_retrieve
			)


#add_executable(demo_mono_multi_scene_retriever
#               demo_mono_multi_scene_retriever.cpp)
#target_link_libraries(demo_mono_multi_scene_retriever
#			${REQUIRED_LIBRARIES}
#			scene_retrieve
#                        multi_scene_retriever)

#add_executable(demo_stereo_multi_scene_retriever
#               demo_stereo_multi_scene_retriever.cpp)

#target_link_libraries(demo_stereo_multi_scene_retriever
#                        ${REQUIRED_LIBRARIES}
#                        scene_retrieve
#                        multi_scene_retriever)




